﻿using MySqlConnector;

namespace Front._1120;

public partial class Form2 : Form
{
    public Form2()
    {
        InitializeComponent();
    }


    private void button3_Click(object sender, EventArgs e)
    {

    }
    
    private void pictureBox1_Click(object sender, EventArgs e)
    {
        throw new System.NotImplementedException();
    }


    private void button4_Click(object sender, EventArgs e)
    {
        using var connection = new MySqlConnection("Server=myserver;User ID=mylogin;Password=mypass;Database=mydatabase");
        connection.Open();

        using var command = new MySqlCommand("SELECT * FROM admin_info;", connection);
        using var reader = command.ExecuteReader();
        while (reader.Read())
            Console.WriteLine(reader.GetString(0));
    }
}